package com.jbinfo.qingcaowan.studyManager.dao;

import java.io.Serializable;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jbinfo.qingcaowan.common.dao.CommonDAO;
import com.jbinfo.qingcaowan.studyManager.dto.BookCardModel;
import com.jbinfo.qingcaowan.studyManager.entity.BookCard;
import com.jbinfo.qingcaowan.studyManager.entity.CycleDetail;
import com.jbinfo.qingcaowan.studyManager.entity.CycleDetailCard;
import com.jbinfo.qingcaowan.studyManager.entity.CycleMain;
/**
 * 
* @ClassName: StudyManagerDao 
* @Description: TODO
* @author ZhangLei
* @date 2016年5月24日 下午4:03:23
 */
public interface CardManagerDao extends CommonDAO<BookCard, Serializable> {
    /**卡片管理**/
	//查询
	public List<BookCard> getCardList(BookCardModel bookCardModel);
    //保存
	public void save(BookCard bookCard);
	//详情
	public BookCard getBookCardInfo(BookCard bookCard);
	//编辑
	public int editBookCard(BookCard bookCard);
	//删除
	public int delBookCard(String cardId);
	//
	public List<BookCard> getCardByCode(BookCard bookCard);
	//card query
	public List<BookCard> queryCardList(BookCard bookCard);

	// 根据组织、书籍 查询任务天数
	public List<CycleDetail> findCyCleDate(CycleMain cycleMain);
	//根据detailId 查询卡片内容
	public List<BookCard> findCardInfoByCyCle(CycleDetailCard cycleDetailCard);
	
	// 根据bookId 获取目录及卡片名称
	public List<CycleDetail> findChapterAndCardName(@Param("bookId") String bookId);
	
	// 根据taskDate 获取当天总卡片数
	public Integer findCardCntByTaskDate(CycleDetailCard cycleDetailCard);
	
}
